/**
 * Created by zyg on 16/1/28.
 */
var _ = require('lodash');

window.log = console.log.bind(console);

window.log2 = function(){

  var args = _.map(arguments, function (arg) {
    if(_.isPlainObject(arg)){
      return JSON.stringify(arg)
    }
    return arg;
  });

  console.log.apply(console,args);
};

window.P = phantom;

window.exit = function (code) {
  phantom.exit(code);
};

